<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%-- 
    Document   : logged
    Created on : Feb 18, 2012, 11:11:49 PM
    Author     : THANH
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<h3>Hello: ${sessionScope.Account.username}</h3> 
<h4><a href="Controller?Action=LogoutAction">Logout</a>
    <span>
        <c:set var="check" value="admin" /> 
        <c:if test="${sessionScope.Account.roles == check }">
            <a href="#">Upload sách</a>
        </c:if>
    </span>
</h4> 
<h3>Thư mục của bạn</h3> 
<c:if test="${not empty sessionScope.Account.listFolders}"> 
    <ul>
        <c:forEach var="f" items="${sessionScope.Account.listFolders}">
            <li>${f.folderTitle} </li>
            <c:if test="${not empty f.listBooks}">
                <ul>
                    <c:forEach var="b" items="${f.listBooks}">
                        <li><a href="Controller?Action=BookAction&Id=${b.bookId}">${b.bookName}</a> </li>
                    </c:forEach>
                </ul>
            </c:if> 
        </c:forEach>
    </ul>
</c:if>  

<a href="folder.jsp">Tạo thư mục</a>
